<script lang="ts" context="module">
  import type { Load } from "@sveltejs/kit/types/internal";

  export const load: Load = async({ fetch, params }) => {
		const res = await fetch(`/${params.scope}.json`);

		if (res.ok) {
			const data = await res.json();

			return {
				props: {
          ...data,
        },
        stuff: {
          scope: data.scope,
        }
			};
		}

		return;
	}
</script>

<script lang="ts">
  import type Scope from "$lib/models/scope";

  export let scope: Scope;
</script>

<h1>{scope.name}</h1>

<slot></slot>